package com.donfu.system.domain.house;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.donfu.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.donfu.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 商品sku(存具体的商品)对象 house_goods_sku
 *
 * @author donfu
 * @date 2021-12-06
 */
@ApiModel(description = "商品sku(存具体的商品)对象")
public class HouseGoodsSku implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /** 商品集ID(spuId) */
    @ApiModelProperty(value = "商品集ID(spuId)")
    @Excel(name = "商品集ID(spuId)")
    private Long houseGoodsId;

    /** 销售价格，单位为分 */
    @ApiModelProperty(value = "销售价格，单位为分")
    @Excel(name = "销售价格，单位为分")
    private BigDecimal price;

    /** sku的特有规格参数键值对，json格式，反序列化时请使用linkedHashMap，保证有序 */
    @ApiModelProperty(value = "sku的特有规格参数键值对，json格式，反序列化时请使用linkedHashMap，保证有序")
    @Excel(name = "sku的特有规格参数键值对，json格式，反序列化时请使用linkedHashMap，保证有序")
    private String ownSpec;

    /** 特有规格属性在spu属性模板中的对应下标组合 */
    @ApiModelProperty(value = "特有规格属性在spu属性模板中的对应下标组合")
    @Excel(name = "特有规格属性在spu属性模板中的对应下标组合")
    private String indexes;

    /** 是否有效， 0无效， 1有效 */
    @ApiModelProperty(value = "是否有效， 0无效， 1有效")
    @Excel(name = "是否有效， 0无效， 1有效")
    private Integer enable;

    /** 添加时间 */
    @ApiModelProperty(value = "添加时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    /** 更新时间 */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setHouseGoodsId(Long houseGoodsId)
    {
        this.houseGoodsId = houseGoodsId;
    }

    public Long getHouseGoodsId()
    {
        return houseGoodsId;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setOwnSpec(String ownSpec)
    {
        this.ownSpec = ownSpec;
    }

    public String getOwnSpec()
    {
        return ownSpec;
    }
    public void setIndexes(String indexes)
    {
        this.indexes = indexes;
    }

    public String getIndexes()
    {
        return indexes;
    }
    public void setEnable(Integer enable)
    {
        this.enable = enable;
    }

    public Integer getEnable()
    {
        return enable;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }
    public void setUpdateDate(Date updateDate)
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate()
    {
        return updateDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("houseGoodsId", getHouseGoodsId())
                .append("price", getPrice())
                .append("ownSpec", getOwnSpec())
                .append("indexes", getIndexes())
                .append("enable", getEnable())
                .append("createDate", getCreateDate())
                .append("updateDate", getUpdateDate())
                .toString();
    }
}